/*
 * XML Type:  StopCheckResponse
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.StopCheckResponse
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML StopCheckResponse(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class StopCheckResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.StopCheckResponse
{
    
    public StopCheckResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CURDEF$0 = 
        new javax.xml.namespace.QName("", "CURDEF");
    private static final javax.xml.namespace.QName BANKACCTFROM$2 = 
        new javax.xml.namespace.QName("", "BANKACCTFROM");
    private static final javax.xml.namespace.QName STPCHKNUM$4 = 
        new javax.xml.namespace.QName("", "STPCHKNUM");
    private static final javax.xml.namespace.QName FEE$6 = 
        new javax.xml.namespace.QName("", "FEE");
    private static final javax.xml.namespace.QName FEEMSG$8 = 
        new javax.xml.namespace.QName("", "FEEMSG");
    
    
    /**
     * Gets the "CURDEF" element
     */
    public net.ofx.types.x2003.x04.CurrencyEnum.Enum getCURDEF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CURDEF$0, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.CurrencyEnum.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "CURDEF" element
     */
    public net.ofx.types.x2003.x04.CurrencyEnum xgetCURDEF()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CurrencyEnum target = null;
            target = (net.ofx.types.x2003.x04.CurrencyEnum)get_store().find_element_user(CURDEF$0, 0);
            return target;
        }
    }
    
    /**
     * Sets the "CURDEF" element
     */
    public void setCURDEF(net.ofx.types.x2003.x04.CurrencyEnum.Enum curdef)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CURDEF$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CURDEF$0);
            }
            target.setEnumValue(curdef);
        }
    }
    
    /**
     * Sets (as xml) the "CURDEF" element
     */
    public void xsetCURDEF(net.ofx.types.x2003.x04.CurrencyEnum curdef)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CurrencyEnum target = null;
            target = (net.ofx.types.x2003.x04.CurrencyEnum)get_store().find_element_user(CURDEF$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.CurrencyEnum)get_store().add_element_user(CURDEF$0);
            }
            target.set(curdef);
        }
    }
    
    /**
     * Gets the "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount getBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "BANKACCTFROM" element
     */
    public void setBANKACCTFROM(net.ofx.types.x2003.x04.BankAccount bankacctfrom)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().find_element_user(BANKACCTFROM$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$2);
            }
            target.set(bankacctfrom);
        }
    }
    
    /**
     * Appends and returns a new empty "BANKACCTFROM" element
     */
    public net.ofx.types.x2003.x04.BankAccount addNewBANKACCTFROM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BankAccount target = null;
            target = (net.ofx.types.x2003.x04.BankAccount)get_store().add_element_user(BANKACCTFROM$2);
            return target;
        }
    }
    
    /**
     * Gets array of all "STPCHKNUM" elements
     */
    public net.ofx.types.x2003.x04.StopCheckNumber[] getSTPCHKNUMArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(STPCHKNUM$4, targetList);
            net.ofx.types.x2003.x04.StopCheckNumber[] result = new net.ofx.types.x2003.x04.StopCheckNumber[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "STPCHKNUM" element
     */
    public net.ofx.types.x2003.x04.StopCheckNumber getSTPCHKNUMArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckNumber target = null;
            target = (net.ofx.types.x2003.x04.StopCheckNumber)get_store().find_element_user(STPCHKNUM$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "STPCHKNUM" element
     */
    public int sizeOfSTPCHKNUMArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(STPCHKNUM$4);
        }
    }
    
    /**
     * Sets array of all "STPCHKNUM" element
     */
    public void setSTPCHKNUMArray(net.ofx.types.x2003.x04.StopCheckNumber[] stpchknumArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(stpchknumArray, STPCHKNUM$4);
        }
    }
    
    /**
     * Sets ith "STPCHKNUM" element
     */
    public void setSTPCHKNUMArray(int i, net.ofx.types.x2003.x04.StopCheckNumber stpchknum)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckNumber target = null;
            target = (net.ofx.types.x2003.x04.StopCheckNumber)get_store().find_element_user(STPCHKNUM$4, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(stpchknum);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "STPCHKNUM" element
     */
    public net.ofx.types.x2003.x04.StopCheckNumber insertNewSTPCHKNUM(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckNumber target = null;
            target = (net.ofx.types.x2003.x04.StopCheckNumber)get_store().insert_element_user(STPCHKNUM$4, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "STPCHKNUM" element
     */
    public net.ofx.types.x2003.x04.StopCheckNumber addNewSTPCHKNUM()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.StopCheckNumber target = null;
            target = (net.ofx.types.x2003.x04.StopCheckNumber)get_store().add_element_user(STPCHKNUM$4);
            return target;
        }
    }
    
    /**
     * Removes the ith "STPCHKNUM" element
     */
    public void removeSTPCHKNUM(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(STPCHKNUM$4, i);
        }
    }
    
    /**
     * Gets the "FEE" element
     */
    public java.lang.String getFEE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FEE$6, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "FEE" element
     */
    public net.ofx.types.x2003.x04.AmountType xgetFEE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(FEE$6, 0);
            return target;
        }
    }
    
    /**
     * Sets the "FEE" element
     */
    public void setFEE(java.lang.String fee)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FEE$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FEE$6);
            }
            target.setStringValue(fee);
        }
    }
    
    /**
     * Sets (as xml) the "FEE" element
     */
    public void xsetFEE(net.ofx.types.x2003.x04.AmountType fee)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(FEE$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AmountType)get_store().add_element_user(FEE$6);
            }
            target.set(fee);
        }
    }
    
    /**
     * Gets the "FEEMSG" element
     */
    public java.lang.String getFEEMSG()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FEEMSG$8, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "FEEMSG" element
     */
    public net.ofx.types.x2003.x04.ShortMessageType xgetFEEMSG()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ShortMessageType target = null;
            target = (net.ofx.types.x2003.x04.ShortMessageType)get_store().find_element_user(FEEMSG$8, 0);
            return target;
        }
    }
    
    /**
     * Sets the "FEEMSG" element
     */
    public void setFEEMSG(java.lang.String feemsg)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FEEMSG$8, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FEEMSG$8);
            }
            target.setStringValue(feemsg);
        }
    }
    
    /**
     * Sets (as xml) the "FEEMSG" element
     */
    public void xsetFEEMSG(net.ofx.types.x2003.x04.ShortMessageType feemsg)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.ShortMessageType target = null;
            target = (net.ofx.types.x2003.x04.ShortMessageType)get_store().find_element_user(FEEMSG$8, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.ShortMessageType)get_store().add_element_user(FEEMSG$8);
            }
            target.set(feemsg);
        }
    }
}
